package com.taxi.driver.module.vo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.taxi.driver.data.entity.BillEntity;

import java.util.List;

public class BillVO {
    public static BillVO createFrom(BillEntity entity) {
        if (entity == null) return new BillVO();
        String strJson = JSON.toJSONString(entity);
        return JSON.parseObject(strJson, BillVO.class);
    }

    @JSONField(name = "total")
    public String total;//总余额

    @JSONField(name = "list")
    public List<BillItemVO> bills;

}
